<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 润
  Date: 2021/7/27
  Time: 17:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1 align="center">班级页面</h1>
<div><a href="addClass.jsp?gid=${requestScope.gradeId}">添加班级</a></div><br>
<div><a href="CourseServlet?action=queryAllCourse&gid=${requestScope.gradeId}">查看课程</a></div><br>
<div><a href="addCourse.jsp?gid=${requestScope.gradeId}&cid=${requestScope.collegeId}">添加课程</a></div><br>
<div align="center">
    <table>
        <tr>
            <th>序号</th>
            <th>班级名称</th>
        </tr>
        <c:forEach items="${requestScope.classes}" var="Class" varStatus="status"><br>
            <tr>
                <td>${ status.index + 1}</td>
                <td><a href="StudentServlet?action=queryAllStudent&classId=${Class.id}">${Class.named}</a></td>
                <td><a href="ClassServlet?action=queryOneClass&id=${Class.id}">修改</a> </td>
                <td><a href="ClassServlet?action=deleteClass&id=${Class.id}">删除</a> </td>
            </tr>
        </c:forEach>
    </table>
</div >
</body>
</html>
